Skip to main content

List AI Models

Used to retrieve a paginated list of AI models with optional filtering. This allows you to view and search through all configured AI models in your project.

API Endpoint

PropertyValue
Request MethodGET
Request URLhttps://api.seliseblocks.com/models/

Request

Request Example

# Get all models with default pagination
curl -X GET 'https://api.seliseblocks.com/models/?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

# Filter by provider
curl -X GET 'https://api.seliseblocks.com/models/?provider=openai&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

# Filter by status and type
curl -X GET 'https://api.seliseblocks.com/models/?status=valid&model_type=chat&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

# Search with pagination
curl -X GET 'https://api.seliseblocks.com/models/?search=GPT&page=1&page_size=10&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

# Combine multiple filters
curl -X GET 'https://api.seliseblocks.com/models/?provider=openai&model_type=chat&is_active=true&page=1&page_size=20&project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

Query Parameters

FieldTypeRequiredDescription
providerstringNoFilter by provider. Available values: openai, azure, anthropic, google, mistral, deepseek, openrouter, grok, perplexity, together, fireworks, groq, custom
model_typestringNoFilter by model type. Available values: chat, embedding, completion
project_keystringNoFilter by project key.
is_activebooleanNoFilter by active status (true/false).
statusstringNoFilter by validation status. Available values: valid, invalid
searchstringNoSearch by display name or description.
pageintegerNoPage number for pagination (default: 1, minimum: 1).
page_sizeintegerNoNumber of items per page (default: 20, minimum: 1, maximum: 100).

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted response format. Use application/json
note

Model Providers

  • openai: Official OpenAI API models (GPT-4, GPT-3.5, etc.)
  • azure: Azure OpenAI Service models
  • anthropic: Anthropic Claude models
  • google: Google AI models (PaLM, Gemini)
  • mistral: Mistral AI models
  • deepseek: DeepSeek models
  • openrouter: OpenRouter aggregated models
  • grok: xAI Grok models
  • perplexity: Perplexity AI models
  • together: Together AI models
  • fireworks: Fireworks AI models
  • groq: Groq models
  • custom: Custom or self-hosted models

Model Types

  • chat: Conversational models for chat interactions
  • embedding: Models for generating embeddings
  • completion: Text completion models

Status Values

  • valid: Model credentials are valid and operational
  • invalid: Model credentials failed validation or expired
tip

Filtering and searching best practices:

  • Use provider filter to narrow results to specific AI providers
  • Combine model_type and provider for precise searches
  • Use is_active=true to see only currently enabled models
  • Filter by status=valid to exclude models with credential issues
  • Use search to find models by name or description
  • Adjust page_size based on UI requirements (10-50 recommended)
  • Check has_next to implement infinite scrolling

The list helps you:

  • View all configured models across projects
  • Identify models with credential issues
  • Find available models for specific use cases
  • Monitor model activation status
  • Audit model configurations
  • Plan model consolidation or cleanup

Response

Success Response (200 OK)

Returns a paginated list of AI models matching the filter criteria.

{
"models": [
{
"_id": "model_123",
"CreatedDate": "2025-12-01T10:30:00Z",
"LastUpdatedDate": "2026-01-10T14:20:00Z",
"CreatedBy": "user_456",
"Language": "en",
"LastUpdatedBy": "user_789",
"OrganizationIds": ["org_001"],
"Tags": ["production", "gpt-4"],
"Provider": "openai",
"ModelType": "chat",
"ServicePlatform": "official_api",
"ProjectKey": "YOUR_PROJECT_KEY",
"Description": "GPT-4 Turbo model for production use",
"Capabilities": {
"max_tokens": 8192,
"supports_functions": true,
"supports_vision": false
},
"DisplayName": "GPT-4 Turbo Production",
"ModelName": "gpt-4-turbo-preview",
"ApiKey": "***masked***",
"BaseUrl": "https://api.openai.com/v1",
"OpenAiOrganizationId": "org-123456",
"OpenAiProjectId": null,
"ApiVersion": null,
"DeploymentName": null,
"CustomParameters": {},
"CustomHeaders": {},
"Status": "valid",
"IsActive": true,
"HasStreaming": true
},
{
"_id": "model_456",
"CreatedDate": "2025-11-15T08:00:00Z",
"LastUpdatedDate": "2026-01-05T16:45:00Z",
"CreatedBy": "user_456",
"Language": "en",
"LastUpdatedBy": "user_456",
"OrganizationIds": ["org_001"],
"Tags": ["development", "claude"],
"Provider": "anthropic",
"ModelType": "chat",
"ServicePlatform": "official_api",
"ProjectKey": "YOUR_PROJECT_KEY",
"Description": "Claude 3 Opus for development testing",
"Capabilities": {
"max_tokens": 4096,
"supports_functions": false,
"supports_vision": true
},
"DisplayName": "Claude 3 Opus Dev",
"ModelName": "claude-3-opus-20240229",
"ApiKey": "***masked***",
"BaseUrl": "https://api.anthropic.com",
"OpenAiOrganizationId": null,
"OpenAiProjectId": null,
"ApiVersion": null,
"DeploymentName": null,
"CustomParameters": {},
"CustomHeaders": {},
"Status": "valid",
"IsActive": true,
"HasStreaming": true
}
],
"project_key": "YOUR_PROJECT_KEY",
"total": 127,
"page": 1,
"page_size": 20,
"has_next": true
}

Response Fields

FieldTypeDescription
modelsarrayArray of model objects matching the filter criteria.
project_keystringThe project key used for filtering.
totalintegerTotal number of models matching the filters.
pageintegerCurrent page number.
page_sizeintegerNumber of items per page.
has_nextbooleanWhether there are more pages available.

Model Object Fields

FieldTypeDescription
_idstringUnique identifier of the model.
CreatedDatestringISO 8601 timestamp when the model was created.
LastUpdatedDatestringISO 8601 timestamp when the model was last updated.
CreatedBystringUser ID who created the model.
LanguagestringLanguage code for the model.
LastUpdatedBystringUser ID who last updated the model.
OrganizationIdsarrayArray of organization IDs.
TagsarrayArray of tags for categorization.
ProviderstringAI provider name.
ModelTypestringType of model (chat, embedding, completion).
ServicePlatformstringService platform type.
ProjectKeystringProject key the model belongs to.
DescriptionstringDescription of the model.
CapabilitiesobjectModel capabilities and features.
DisplayNamestringHuman-readable display name.
ModelNamestringTechnical model name.
ApiKeystringAPI key (masked in responses).
BaseUrlstringBase URL for API requests.
OpenAiOrganizationIdstringOpenAI organization ID (if applicable).
OpenAiProjectIdstringOpenAI project ID (if applicable).
ApiVersionstringAPI version (for Azure OpenAI).
DeploymentNamestringDeployment name (for Azure OpenAI).
CustomParametersobjectCustom parameters for the model.
CustomHeadersobjectCustom HTTP headers.
StatusstringValidation status (valid, invalid).
IsActivebooleanWhether the model is active.
HasStreamingbooleanWhether the model supports streaming.

Empty Results Response

Returns when no models match the filter criteria.

{
"models": [],
"project_key": "YOUR_PROJECT_KEY",
"total": 0,
"page": 1,
"page_size": 20,
"has_next": false
}

Error Response (422 Unprocessable Entity)

Returns validation error details when the request parameters are invalid.

{
"detail": [
{
"loc": [
"query",
"page_size"
],
"msg": "ensure this value is less than or equal to 100",
"type": "value_error.number.not_le"
}
]
}

Error Response Fields

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., query parameter).
msgstringHuman-readable error message.
typestringError type identifier.

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
400Bad Request - Invalid query parametersBad Request
422Validation Error - Invalid parameter valuesUnprocessable Entity